cmake_minimum_required(VERSION 2.6)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)

project(realmd)

option(64BIT "64BIT" FALSE)
if (64BIT)
	add_definitions(-D__64BIT__)
endif()

option(WINDOWS "WINDOWS" FALSE)
if (WINDOWS)
	add_definitions(-D__WINDOWS__)
	add_definitions(-D_WIN32_WINNT=0x0501)
	add_definitions(-W3)
else ()
	add_definitions(-D__LINUX__)
	add_definitions(-Wall)
	if (CMAKE_COMPILER_IS_GNUCXX)
		add_definitions(-std=gnu++0x)
	else ()
		add_definitions(-std=stdc++11)
	endif()
endif()

option(DEBUG "DEBUG" FALSE)
if (DEBUG)
add_definitions(-D__DEBUG__)
endif()

set(PROJINC_dir ${PROJECT_SOURCE_DIR}/../../monkey)

set(realmd_SOURCES
	${PROJINC_dir}/realmd/RealmdPlayer.hpp
	RealmdPlayer.cc
	${PROJINC_dir}/realmd/RealmdPlayerManager.hpp
	RealmdPlayerManager.cc
	${PROJINC_dir}/realmd/Realmd.hpp
	Realmd.cc
	Main.cc
)

include_directories( 
	${PROJECT_SOURCE_DIR}
	${PROJINC_dir}
	${PROJECT_SOURCE_DIR}/../../deps
	${PROJECT_SOURCE_DIR}/../../deps/pio
)
link_directories(
    ${Libev_Lib}
)

add_executable(realmd ${realmd_SOURCES})
target_link_libraries(realmd pio common)

if (WINDOWS)
else()
endif()
